'use client';
import { getQueryClient } from '@/utils/api';
import { QueryClientProvider } from '@tanstack/react-query';
import { useState } from 'react';

export function TrpcClientProvider({ children }: React.PropsWithChildren) {
  const [queryClient] = useState(getQueryClient());

  return (
    <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
  );
}
